import DS from 'ember-data';
import BaseModel from './base-model';
import Ember from 'ember';

export default BaseModel.extend({
  dateService: Ember.inject.service("date-service"),
  lackNum:DS.attr('number'),//缺药记录数量，即item的数量
  lastUpdateDateTime:DS.attr('number'),//更新时间
  createUser:DS.belongsTo('user'),//创建人
  createDateTime:DS.attr('number'),//创建时间
  lastUpdateUser:DS.belongsTo('user'),//更新操作者userid
  remark: DS.attr('string'),//备注
  createDateTimeStr:Ember.computed("createDateTime", function() {
      var createDateTime = this.get("createDateTime");
      return createDateTime?this.get("dateService").formatDate(createDateTime, "yyyy-MM-dd hh:mm:ss"):'无';
  }),
});
